import {FileSpace} from "../../filespace/src";

let fileSpace: FileSpace | undefined;

export async function initFileSpace(rootPath: string) {
    if (fileSpace) {
        return fileSpace.initialize();
    }
    fileSpace = new FileSpace({
        rootPath,
        maxDepth: 3,
        maxHistoryCount: 100,
    })
    await fileSpace.initialize()
}

export default fileSpace
